/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package cong.javadanang.model.dao;

import cong.javadanang.model.entity.User;
import java.util.List;

/**
 *
 * @author Pham
 */
public interface UserDAO {

    User getUserById(int userId);
    User getUserByUserName(String userName);

    /**
     *
     * @param param condition get UserList
     * @return
     * if(param = 1) then return all listOfUser with active = true
     * else if(param = 0) then return all listOfUser with active = false
     * else return All User from DB
     */
    List<User> getUsers(int param);
    
    boolean checkUserName(String userName);
    boolean checkEmail(String email);
    boolean checkLogin(String userName, String pwd);
    boolean createUser(User user);
    boolean updateUser(User user);
    boolean deleteUser(User user);
    boolean removeUser(User user);
    boolean restoreUser(User user);
    
}
